package model.command;

import model.Command;
import model.Reference;
import controller.RuntimeState;

public class Load extends Command {

	private static final long serialVersionUID = 4753608322853784679L;

	@Override
	public String getCommandName() {
		return "LOAD";
	}

	@Override
	public void run(RuntimeState runtimeState, Reference... refs) {
		int value = runtimeState.getRegisterValueAt(refs[0].getAddress());
		runtimeState.setAccumulator(value);
	}

	@Override
	public int getParameterCount() {
		return 1;
	}
}
